{#
This file is part of Pynguin.

SPDX-FileCopyrightText: 2019–2025 Pynguin Contributors

SPDX-License-Identifier: MIT
-#}
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Pynguin coverage report</title>
  <style>
{# Little hack to embed pygments css styles  #}
{{formatter(style="solarized-dark").get_style_defs('.highlight')}}

body{
    color: #c9d1d9;
    background: #0d1117;
    font-family: monospace;
    font-size: 16px;
}

td.lines span{
    display: block;
    padding-right: 8px;
    line-height: 125%;
}

.notCovered{
    border-right: 5px solid darkred;
}
.partiallyCovered{
    border-right: 5px solid orangered;
}
.fullyCovered{
    border-right: 5px solid darkgreen;
}
.notRelevant{
    border-right: 5px solid transparent;
}

</style>
</head>
<body>
<h1>Pynguin coverage report for module '{{cov_report.module}}'</h1>
{% if cov_report.branch_coverage != None -%}
<p>Achieved {{"{:.2%}".format(cov_report.branch_coverage)}} branch coverage:
{{cov_report.branchless_code_objects.covered}}/{{cov_report.branchless_code_objects.existing}} branchless code objects covered.
{{cov_report.branches.covered}}/{{cov_report.branches.existing}} branches covered.</p>
{% endif -%}
{% if cov_report.line_coverage != None -%}
<p>Achieved {{"{:.2%}".format(cov_report.line_coverage)}} line coverage:
{{cov_report.lines.covered}}/{{cov_report.lines.existing}} lines covered. </p>
{% endif -%}
  <table>
    <tbody>
        <tr>
            <td style="width: 40px; text-align: right;" class="lines">
                {% for line in cov_report.line_annotations -%}
                  {% if line.total.existing == 0 -%}
                    <span class="notRelevant">{{line.line_no}}</span>
                  {% elif line.total.covered == 0 -%}
                    <span class="notCovered" title="{{line.message()}}">{{line.line_no}}</span>
                  {% elif line.total.covered < line.total.existing -%}
                    <span class="partiallyCovered" title="{{line.message()}}">{{line.line_no}}</span>
                  {% else -%}
                    <span class="fullyCovered" title="{{line.message()}}">{{line.line_no}}</span>
                  {% endif -%}
                {% endfor -%}
            </td>
            <td style="width: 100%;">{{highlight("".join(cov_report.source), lexer(), formatter(style="solarized-dark"))}}</td>
        </tr>
    </tbody>
</table>
<footer>
  <p>Created at {{date}}</p>
</footer>
</body>
</html>
